package cn.itcast.servlet;

import cn.itcast.domain.Items;
import cn.itcast.service.ItemsService;
import cn.itcast.service.impl.ItemsServiceImpl;
import org.junit.Test;

import java.util.List;

public class ItemServlet {
    private ItemsService service = new ItemsServiceImpl();

    //查询所有商品信息
    @Test
    public void findAll(){
        List<Items> items = service.findAll();
        System.out.println(items);
    }

    //添加商品信息
    @Test
    public  void add(){
        Items it = new Items(2,"海贼王手办",699f,"中国大陆");
        service.add(it);
    }
}
